<form method="POST" name="theForm" id="theForm">
	<table width="90%" cellpadding="5" cellspacing="0" id="add" align="center">
		<tr>
			<td class="label">Padre</td>
			<td>
				<select name="category">
					<?php
						foreach ($categories as $category){
							if( $category[id] == $subcat_data[category] ) $selected = "selected";
							else $selected = "";
							echo "<option value='$category[id]' $selected>$category[description]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<?php
		foreach($languages as $language){
			echo "<tr>
				<td class='label'>Nombre ($language[name])</td>
				<td><input type=\"text\" name=\"subcategory_name_$language[id]\" value=\"".$subcat_data["subcategory_name_".$language[id]]."\" /></td>
			</tr>
			";
		}
		
		?>
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" /></td>
		</tr>
		<?php
			if( $aErrores ){
				echo "<tr>
					<td></td>
					<td class='error'>";
				echo implode(", ", $aErrores);
				echo "</td>
				</tr>";
			}
		?>
	</table>
<?php
	if($subcategory) echo "<input type=\"hidden\" name=\"subcategory_id\" value=\"$subcategory[id]\" />";
?>
</form>